package day06;
public class MethodDemo {
    public static void main(String[] args){
        double a=getNum();
        System.out.println(a);

        int b=plus(5,6);
        System.out.println(b);
        System.out.println();
        int[] d=test(5,100);
        System.out.println(d.length);
        int[] e=test(10,1000);
        for (int j : e) {
            System.out.println(j);
        }

        sayHello("张三",25);
        sayHello("李四",66);
        aMethod();
        System.out.println(444);




    }

    public static double getNum(){
        return 8.88;
    }
    public static int plus(int num1,int num2){
        return (num1+num2);
    }
    public static int[] test(int len,int max){
        int[] arr=new int[len];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*(max+1));
        }
        return arr;

    }
    public static void sayHello(String name,int age){
        if(age>60){
            return;
        }
        System.out.println("大家好我叫"+name+"我今年"+age+"岁了");
    }
    public static void aMethod(){
        System.out.println(111);
        bMethod();
        System.out.println(333);
    }
    public static void bMethod(){
        System.out.println(222);
    }







}



